package com.gitee.zw.irmp.report.entity;

import com.vladmihalcea.hibernate.type.json.JsonType;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.IdClass;
import jakarta.persistence.Table;
import lombok.Data;
import org.hibernate.annotations.Type;

import java.io.Serializable;

@Entity
@IdClass(ReportData.PK.class)
@Table(name = "ri_rpt_report_data")
@Data
public class ReportData {
    @Data
    public static class PK implements Serializable {
        private String reportCode;
        private String dataDate;
        private String batchNo;
        private String branchCode;
        private String itemCode;
    }

    @Id
    private String reportCode;
    @Id
    private String dataDate;
    @Id
    private String batchNo;
    @Id
    private String branchCode;
    @Id
    private String itemCode;
    @Type(JsonType.class)
    private String rowData;
}
